package user

import "gorm.io/gorm"

type User struct {
	gorm.Model        // gorm自带ID, craeteAt, updateAt, deleteAt
	UserId     string `json:"userId" gorm:"column:user_id;size:255;not null;index:idx_user_id,unique;comment:'用户id'"`
	Email      string `json:"email" gorm:"column:email;size:255;not null;index:idx_email,unique;comment:'注册邮箱'"`
	Password   string `json:"-" gorm:"column:password;size:255;not null;comment:'注册密码hash'"`
	Version    string `json:"version" gorm:"column:version;size:255;not null;comment:'用户系统版本'"`
}

func (User) TableName() string {
	return "tb_user"
}
